//
//  NSObject+ActionSheetHelp.m
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 BaseBusiness. All rights reserved.
//

#import "NSObject+ActionSheetHelp.h"
#import "THActionSheetConfig.h"
@implementation NSObject (ActionSheetHelp)

- (void)showSheetTitle:(nullable NSString*)title
          cancleTitle:(nullable NSString*)cancleTitle
otherButtonTitleArray:(nullable NSArray<NSString *> *)otherButtonTitleArray
            didDismiss:(nullable THActionSheetDidDismissHandler)didDismissHandler{
    UIFont *font = [UIFont fontWithName:FONT_REGULAR size:16];
    [THActionSheetConfig.config setButtonHeight:50.0f];
    [THActionSheetConfig.config setSeparatorColor:ColorFromHex(0xededed)];
    [THActionSheetConfig.config setButtonColor:ColorFromHex(0x333333)];
    [THActionSheetConfig.config setCancelButtonColor:ColorFromHex(0x333333)];
    [THActionSheetConfig.config setDivisionViewBGColor:ColorFromHex(0XF3F5F9)];
    [THActionSheetConfig.config setButtonBghighlightColor:ColorFromHex(0xe5e5e5)];
    [THActionSheetConfig.config setButtonFont:font];
    
    THActionSheetView *sheetView = [[THActionSheetView alloc]
                                    initWithTitle:title
                                    cancelButtonTitle:cancleTitle
                                    clicked:didDismissHandler
                                    otherButtonTitleArray:otherButtonTitleArray];
    
    
    [sheetView show];
    
    
    
}


@end
